projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f77d4d7
)
timsort: Actually 0-terminate the array in get_runs()
author
Benjamin Otte
<otte@redhat.com>
Wed, 22 Jul 2020 16:59:22 +0000
(18:59 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Wed, 22 Jul 2020 16:59:22 +0000
(18:59 +0200)
This could cause SEGVs when changing the sort during an ongoing sort
operation.
gtk/gtktimsort.c
patch
|
blob
|
history
diff --git
a/gtk/gtktimsort.c
b/gtk/gtktimsort.c
index 548bb292b595a2529c93351cd28513ecb90649be..f3595b01bc7b5866d2285a9a7824d7c6d9a4a586 100644
(file)
--- a/
gtk/gtktimsort.c
+++ b/
gtk/gtktimsort.c
@@
-206,6
+206,8
@@
gtk_tim_sort_get_runs (GtkTimSort *self,
for (i = 0; i < self->pending_runs; i++)
runs[i] = self->run[i].len;
+
+ runs[self->pending_runs] = 0;
}
/*<private>